Skip to content

Conversation

@Coca162
Copy link
Contributor

@Coca162 Coca162 commented Mar 2, 2023

Adds .flatten_ref() to get a immutable reference of a nested option and .flatten_mut() for mutable references.

ACP: rust-lang/libs-team#186
Tracking Issue: #149221

@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2023

r? @cuviper

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 2, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2023

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@cuviper
Copy link
Member

cuviper commented Mar 2, 2023

Please do create an API Change Proposal as linked above.

@rustbot label +T-libs-api -T-libs
r? libs-api

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 2, 2023
@rustbot rustbot assigned joshtriplett and unassigned cuviper Mar 2, 2023
@rust-log-analyzer

This comment has been minimized.

@anden3 anden3 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 14, 2023
@Dylan-DPC Dylan-DPC added S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 20, 2023
@joshtriplett
Copy link
Member

r? libs-api

@rustbot rustbot assigned BurntSushi and unassigned joshtriplett Feb 11, 2024
@bors
Copy link
Collaborator

bors commented Oct 2, 2024

☔ The latest upstream changes (presumably #130829) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 2, 2024
@dtolnay dtolnay removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 3, 2024
@dtolnay dtolnay assigned dtolnay and unassigned BurntSushi Nov 3, 2024
@Coca162 Coca162 force-pushed the option_reference_flattening branch from 4dcfc5d to 0e54845 Compare November 22, 2025 17:31
@rustbot
Copy link
Collaborator

rustbot commented Nov 22, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Coca162
Copy link
Contributor Author

Coca162 commented Dec 18, 2025

@rustbot label -S-waiting-on-ACP
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. labels Dec 18, 2025
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dtolnay
Copy link
Member

dtolnay commented Dec 28, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 28, 2025

📌 Commit 0e54845 has been approved by dtolnay

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 28, 2025
@bors
Copy link
Collaborator

bors commented Dec 29, 2025

⌛ Testing commit 0e54845 with merge 123588a...

@bors
Copy link
Collaborator

bors commented Dec 29, 2025

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing 123588a to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 29, 2025
@bors bors merged commit 123588a into rust-lang:main Dec 29, 2025
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 29, 2025
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 7fefa09 (parent) -> 123588a (this PR)

Test differences

Show 14 test diffs

14 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 123588a5bf9250f214e1931a761f814660e69620 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-apple: 6361.2s -> 7172.9s (+12.8%)
  2. x86_64-gnu-llvm-20: 4437.7s -> 4987.0s (+12.4%)
  3. x86_64-gnu-llvm-20-3: 7314.0s -> 6444.5s (-11.9%)
  4. tidy: 184.8s -> 165.1s (-10.7%)
  5. aarch64-msvc-2: 6524.4s -> 5851.9s (-10.3%)
  6. x86_64-gnu-stable: 8749.0s -> 7956.7s (-9.1%)
  7. dist-x86_64-msvc-alt: 9163.2s -> 9956.1s (+8.7%)
  8. dist-aarch64-msvc: 6240.1s -> 5776.2s (-7.4%)
  9. i686-gnu-1: 8561.7s -> 7935.8s (-7.3%)
  10. dist-apple-various: 3973.9s -> 4260.9s (+7.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (123588a): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [1.7%, 1.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (secondary 0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.0%, -3.0%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 490.488s -> 483.839s (-1.36%)
Artifact size: 390.86 MiB -> 390.87 MiB (0.00%)

@Coca162 Coca162 deleted the option_reference_flattening branch January 8, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.